package auth

import (
	"errors"
	"git.mycaigou.com/gfyx/common/authorize"
	"github.com/gin-gonic/gin"
)

var (
	ErrTenantNotFound error = errors.New("缺少租户代码")
	ErrTenantExpired  error = errors.New("租户已过期")
	ErrTenantInvalid  error = errors.New("无效租户代码")
)

type TenantContext struct {
}

func SetTenantCode(ctx *gin.Context, tenantCode string) (bool, error) {

	ctx.Set(authorize.TENANT_CODE_KEY, tenantCode)
	ctx.Set(authorize.TENANT_NAME_KEY, "云采购测试租户")
	return true, nil
}
